﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLDC.Common.Estate;
using ZLDC.Topo.Model.Estate;
using ZLDC.Topo.BLL.Estate;
using System.Data;

namespace ZLDC.Estate.TM
{
    public partial class NewsDetails : ZLDC.Common.Estate._PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) 
            {
                int id = _Request.GetInt("id", 0);

                DataSet ds = ZLDC.Topo.BLL.Estate.NewsBLL.p_list_Details(id);
                if (ds != null && ds.Tables[0].Rows.Count>0) 
                {
                    lblContent.InnerHtml=ds.Tables[0].Rows[0]["content"].ToString();
                    lblTitle.InnerHtml = ds.Tables[0].Rows[0]["title"].ToString();
                }
            }
        }

        protected void btnKnow_Click(object sender, EventArgs e)
        {
            int id = _Request.GetInt("id", 0);

            ZLDC.Common.Estate._Cookie.SetCookie("Iknownews_" + id + "_" + this.info.m_sUserID,"yes",7);
            System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, GetType(), "ajs", "window.close();", true);

        }
    }
}
